package com.zzyweb.demomp.exception;

import com.zzyweb.demomp.utils.ResultObject;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.HandlerInterceptor;

/**
 * @author zhiyi
 * @date 9/9/25
 **/

@RestControllerAdvice
public class ExceptionHandler {

    public ResultObject handleException(Exception e) {
        e.printStackTrace();
        return ResultObject.error().msg("捕捉到异常" + e.getMessage());
    }

}
